<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Helper_Cache {
	static protected $cache_policy = array
    (
		'life_time'         => 900,
		'serialize'         => true,
		'encoding_filename' => true,
		'cache_dir_depth'   => 0,
		'cache_dir_umask'   => 0700,
		'cache_dir'         => null,
		'test_validity'     => true,
		'test_method'       => 'crc32',
	);

    static function write($cache_id = '', $data) {
        $cacher = new QCache_File(self::$cache_policy);
        $cacher->set($cache_id, $data);
    }

    static function read($cache_id = '') {
        $cacher = new QCache_File(self::$cache_policy);
        return $cacher->get($cache_id);
    }

    static function clear($cache_id = '') {
        $cacher = new QCache_File(self::$cache_policy);
        $cacher->remove($cache_id);
    }
}
?>
